<?php 

namespace app\common\model\Coupon;

use think\Model;

class Receive extends Model
{
    protected $name = 'coupon_receive';

    protected $autoWriteTimestamp = true;
    protected $createTime = 'createtime';

    protected $updateTime = false;

    // 联表查询优惠券
    public function coupon(){
        return $this->belongsTo('app\common\model\Coupon\Coupon', 'cid', 'id', [], 'LEFT')
            ->setEagerlyType(0);
    }
    
    public function business()
    {
        return $this->belongsTo('app\common\model\Business\Business','busid', 'id', [], 'LEFT')->setEagerlyType(0);
    }

}

?>